package Leo.serviceClient.feign;

import feign.codec.Decoder;
import feign.codec.Encoder;
import feign.jaxb.JAXBContextFactory;
import feign.jaxb.JAXBDecoder;
import feign.jaxb.JAXBEncoder;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

//@Configuration
public class XmlConfig {
//    @Bean
//    Decoder getJAXBDecoder() {
//        JAXBContextFactory jaxbContextFactory = new JAXBContextFactory.Builder().build();
//        //获取服务接口
//        return new JAXBDecoder(jaxbContextFactory);//解码器，将xml转化为对象
//    }
//
//    @Bean
//    Encoder getJAXBEncoder() {
//        JAXBContextFactory jaxbContextFactory = new JAXBContextFactory.Builder().build();
//        //获取服务接口
//        return new JAXBEncoder(jaxbContextFactory); //编码器，将对象转化为xml
//    }
//
//    @Bean
//    SAXDecoder decoder(){
//        return SAXDecoder.builder().build();
//    }


}
